/***************************************************************************
 * Copyright 2012-2013 TXT e-solutions SpA
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * This work was performed within the IoT_at_Work Project
 * and partially funded by the European Commission's
 * 7th Framework Programme under the contract ICT-257367.
 *
 * Authors:
 *      Salvatore Piccione (TXT e-solutions SpA)
 *
 * Contributors:
 *        Domenico Rotondi (TXT e-solutions SpA)
 **************************************************************************/
package it.txt.ens.core;

/**
 * This interface represents the set of parameters required to connect to the Access Request Broker
 * of the Event Notification Service (ENS).
 * 
 * @author Salvatore Piccione (TXT e-solutions SpA - salvatore.piccione AT txtgroup.com)
 * @author Domenico Rotondi (TXT e-solutions SpA - domenico.rotondi AT txtgroup.com)
 *
 */
public interface ENSAuthzServiceConnectionParameters {
    
    /**
     * Returns the identifier of the broker user.
     * 
     * @return the identifier of the broker user
     */
    public String getSubjectID ();
    
    /**
     * Returns the token that, together with the <code>subjectID</code> (see {@link #getSubjectID()}), grant access
     * to the Access Request Broker.
     * 
     * @return the access token.
     */
    public String getAccessToken ();
    
    /**
     * Returns the host name/IP address of the machine the broker is deployed on.
     * 
     * @return the host name/IP address of the machine the broker is deployed on
     */
    public String getBrokerHost ();
    
    /**
     * Returns the TCP listening port of the broker.
     * 
     * @return the TCP listening port of the broker
     */
    public int getBrokerPort ();
    
    /**
     * Returns the name of the broker's virtual host.
     * 
     * @return the name of the broker's virtual host
     */
    public String getVirtualHost ();
    
    /**
     * Returns the name of the virtual host resource
     * to be used to receive or submit access requests (i.e. either an AMQP queue or exchange).
     * 
     * @return the name of the virtual host resource
     * to be used to receive or submit access requests (i.e. either an AMQP queue or exchange).
     */
    public String getDestinationName ();
    
    /**
     * States if the communication session with broker is TLS-secured or not.
     * 
     * @return <code>true</code> if the communication should flow through a TLS-secured channel, <code>false</code> otherwise
     */
    public boolean isTLSEnabled ();
    
    /**
     * Returns the HTTP listening port of this broker.<br\>This port is used basically for management.
     * @return the HTTP listening port of this broker.
     */
    public int getManagementPort ();

}
